<?php
/**
 * 前台焦点图显示
 *
 * @package         YDCMS
 * @author          QQ:644157559 <644157559@qq.com>
 * @version         $Id: FocusController.class.php v1.0 2014-06-13 17:27:03 $
 */
namespace Home\Controller;
class FocusController extends CommonController{
    public function _initialize() {
        parent::_initialize();
    }
    
    public function index() {
        $nid = I("get.nid", "", "trim");
        if($nid == ""){
            $this->error("非法操作");
        }
        $focus = D("Focus")->relation(true)->getByNid($nid);
        if(!isArrayAndNotEmpty($focus)){
            $this->error("非法操作");
        }
        
        $this->assign($focus);
        if(!file_exist(T("common:focus"))){
            die("模板不存在");
        }
        $this->display(T("common:focus"));
    }
}
